(**********************************************************************

    :Program.  	 IntuiStruct.def
    :Author.   	 Nicolas Benezan
    :Address.    Postwiesenstr. 2, D7000 Stuttgart 60
    :Phone.      0711/333679
    :shortcut. 	 [bne]
    :Version.  	 1.0a   
    :Date.     	 23.05.88
    :Copyright.  Public Domain (siehe ReadMe)
    :Language. 	 Modula-II
    :Translator. M2Amiga AMSoft
    :Update	 
    :Contents.	 Easy initializing of Intuition structures
    :Remark.	 Copy and use it but please leave my name in, thanks.
    
**********************************************************************)

DEFINITION MODULE IntuiStruct;

FROM Intuition	IMPORT NewScreen,ScreenFlagSet,NewWindow,IDCMPFlagSet,
		WindowFlagSet,ScreenPtr,stdScreenHeight,Image,ImagePtr,
                IntuiText,IntuiTextPtr,Gadget,GadgetPtr,GadgetFlagSet,
                GadgetFlags,ActivationFlagSet,PropInfo,PropInfoFlagSet,
                StringInfo,Menu,MenuPtr,MenuItem,MenuItemPtr,
                MenuItemFlagSet,MenuItemFlags,menuEnabled,WindowPtr,
                RefreshGadgets,RequesterPtr;
FROM Graphics	IMPORT ViewModeSet,ViewModes,DrawModeSet,jam1;
FROM GfxMacros	IMPORT RasSize;
FROM SYSTEM	IMPORT ADR,ADDRESS,BITSET,LONGSET,WORD,CAST;
FROM Exec	IMPORT Byte,UByte;
FROM Arts	IMPORT Assert;
FROM Heap	IMPORT Allocate,AllocMem,Deallocate;

CONST	MenuNull=0FFFFH;
	NoItem=003FH;
        NoSub=001FH;
VAR	CheckWidth,CommWidth,StdHeight:INTEGER;

PROCEDURE StructScreen(VAR NewSc:NewScreen;Depth,Detail,Block:Byte;
	Mode:ViewModeSet;Type:ScreenFlagSet;Title:ADDRESS);

PROCEDURE StructWindow(VAR NewW:NewWindow;Left,Top,Width,Height:INTEGER;
	Detail,Block:Byte;IDCMP:IDCMPFlagSet;Flags:WindowFlagSet;Title
        :ADDRESS;Screen:ScreenPtr;Type:ScreenFlagSet);

PROCEDURE StructImage(VAR NewImage:Image;Left,Top,Width,Height,Depth:
	INTEGER;Pick,OnOff:BITSET;Next:ImagePtr);

PROCEDURE Word(Data:CARDINAL);
PROCEDURE Long(Data:LONGCARD);

PROCEDURE ImageEnd;

PROCEDURE StructText(VAR IText:IntuiText;APen,BPen:Byte;Mode:DrawModeSet;
	Left,Top:INTEGER;Text:ADDRESS;Next:IntuiTextPtr);

PROCEDURE StructGadget(VAR NewGadg:Gadget;Left,Top,Width,Height:INTEGER;
	Flags:GadgetFlagSet;Activ:ActivationFlagSet;Type:CARDINAL;
        Render:ADDRESS;Text:IntuiTextPtr;Excl:LONGSET;ID:INTEGER;
        Next:GadgetPtr);

PROCEDURE ExcludeGadget(Gadgets:GadgetPtr;Window:WindowPtr;
		Requester:RequesterPtr;Mask:LONGSET);

PROCEDURE StructProp(VAR Info:PropInfo;Flags:PropInfoFlagSet;
	HPot,VPot,HBody,VBody:CARDINAL);

PROCEDURE StructString(VAR Info:StringInfo;VAR Buffer,UndoBuf:
	ARRAY OF CHAR);

PROCEDURE LinkMenu(VAR MenuStrip:MenuPtr;Name:ADDRESS;Pos,Width:INTEGER;
	Enabled:BOOLEAN):BOOLEAN;

PROCEDURE Item(Name:ADDRESS;Width:INTEGER;Flags:MenuItemFlagSet;
	Excl:LONGSET;Cmd:CHAR);

PROCEDURE SubItem(Name:ADDRESS;LeftEdge,Width:INTEGER;Flags:
	MenuItemFlagSet;Excl:LONGSET;Cmd:CHAR);

PROCEDURE MenuNum(Num:CARDINAL):CARDINAL;
PROCEDURE ItemNum(Num:CARDINAL):CARDINAL;
PROCEDURE SubNum(Num:CARDINAL):CARDINAL;
PROCEDURE MakeNum(Menu,Item,SubItem:CARDINAL):CARDINAL;

END IntuiStruct.



